home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / music4c.sit / Music4C Folder / Sources Folder / Synthesis_Time.c < prev    next >
Text File  |  1990-06-08  |  1KB  |  57 lines

  1. /*
  2. * ⌐ Graeme Gerrard 1990
  3. * Faculty of Music, University of Melbourne
  4. * Parkville Victoria 3052 Australia.
  5. *
  6. * ARPANET: grae@murdu.ucs.unimelb.edu.au
  7. * telephone: (613) 344 4127, Fax: (613) 344 5346
  8. */
  9. #include "Synthesis_Time.h"
  10.  
  11. static void  Refresh_Dialog(DialogPtr    GetSelection);
  12.  
  13. #define        TRUE   1
  14. #define        NIL    0
  15.  
  16. static void  Refresh_Dialog(GetSelection) 
  17.     DialogPtr    GetSelection;
  18.     Rect    tempRect;
  19.     short    DType;
  20.     Handle    DItem;
  21.  
  22.     GetDItem(GetSelection,1, &DType, &DItem, &tempRect);
  23.     PenSize(3, 3);
  24.     InsetRect(&tempRect, -4, -4);
  25.     FrameRoundRect(&tempRect, 16, 16); 
  26.     PenSize(1, 1); 
  27.     
  28.  
  29. /* ======================================================== */
  30.  
  31.  
  32. void   D_Synthesis_Time()
  33. {
  34.     DialogPtr       GetSelection;
  35.     Rect            tempRect;
  36.     short            itemHit;
  37.      
  38.     GetSelection = GetNewDialog(7, NIL, (WindowPtr)-1);
  39.      
  40.     tempRect.top = GetSelection->portRect.top;
  41.     tempRect.left = GetSelection->portRect.left;
  42.     tempRect.bottom = GetSelection->portRect.bottom;
  43.     tempRect.right = GetSelection->portRect.right;
  44.     tempRect.top = -GetSelection->portBits.bounds.top;
  45.     tempRect.left = ((screenBits.bounds.right - screenBits.bounds.left) - (tempRect.right - tempRect.left)) / 2;
  46.     MoveWindow(GetSelection, tempRect.left, tempRect.top, TRUE);
  47.      
  48.     ShowWindow(GetSelection);
  49.     SelectWindow(GetSelection);
  50.     SetPort(GetSelection);
  51.     Refresh_Dialog(GetSelection); 
  52.     ModalDialog(NIL, &itemHit); 
  53.     DisposDialog(GetSelection); 
  54. }
  55.